﻿using System;
using System.ComponentModel;
using System.Reflection;

namespace StudyLoadAssembly
{
    class Program
    {
        static void Main(string[] args)
        {
            //TestEnum test = TestEnum.One;

            //Type type = typeof(TestEnum);
            //MemberInfo[] memberInfos = type.GetMembers();
            //foreach (MemberInfo memberInfo in memberInfos)
            //{
            //    //Console.WriteLine(memberInfo.Name);
            //    if (memberInfo.Name == test.ToString())
            //    {
            //        DescriptionAttribute attribute = memberInfo.GetCustomAttributes(false)[0] as DescriptionAttribute;
            //        if (attribute != null)
            //        {
            //            Console.WriteLine(attribute.Description);
            //        }
            //    }
            //}

            DateTime end = Convert.ToDateTime("1999-1-1");
            DateTime start = Convert.ToDateTime("1998-1-1");

            Console.WriteLine((end.Month - start.Month));

            Console.ReadLine();
        }
    }

    public enum TestEnum
    {
        [Description("这是第一个")]
        One = 0
    }
}
